<template>
  <a-spin :spinning="confirmLoading">
    <a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
      <a-row>
        <a-col :span="24">
          <a-form-item label="工单号" v-bind="validateInfos.workOrderMark">
            <a-input v-model:value="formData.workOrderMark" placeholder="请输入工单号" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="服保网格" v-bind="validateInfos.guaranteedOrg">
            <a-input v-model:value="formData.guaranteedOrg" placeholder="请输入服保网格" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="工单状态" v-bind="validateInfos.workOrderState">
            <a-input v-model:value="formData.workOrderState" placeholder="请输入工单状态" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="受理时间" v-bind="validateInfos.disposeTime">
		        <a-date-picker placeholder="请选择受理时间"  v-model:value="formData.disposeTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" :disabled="disabled"/>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="用户地址" v-bind="validateInfos.userLocation">
            <a-input v-model:value="formData.userLocation" placeholder="请输入用户地址" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="受理地市" v-bind="validateInfos.disposeCity">
            <a-input v-model:value="formData.disposeCity" placeholder="请输入受理地市" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="规则定位的机构" v-bind="validateInfos.gzdwjg">
            <a-input v-model:value="formData.gzdwjg" placeholder="请输入规则定位的机构" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="产品类型" v-bind="validateInfos.productType">
            <a-input v-model:value="formData.productType" placeholder="请输入产品类型" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="客户等级" v-bind="validateInfos.userGrade">
            <a-input v-model:value="formData.userGrade" placeholder="请输入客户等级" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="障碍类别" v-bind="validateInfos.barrierSort">
            <a-input v-model:value="formData.barrierSort" placeholder="请输入障碍类别" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="留单内容" v-bind="validateInfos.content">
            <a-input v-model:value="formData.content" placeholder="请输入留单内容" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="回单部门" v-bind="validateInfos.receiptOrg">
            <a-input v-model:value="formData.receiptOrg" placeholder="请输入回单部门" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="处理结果" v-bind="validateInfos.resultOfHandling">
            <a-input v-model:value="formData.resultOfHandling" placeholder="请输入处理结果" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="障碍现象" v-bind="validateInfos.faultSignature">
            <a-input v-model:value="formData.faultSignature" placeholder="请输入障碍现象" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="处理原因" v-bind="validateInfos.disposeCause">
            <a-input v-model:value="formData.disposeCause" placeholder="请输入处理原因" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="回单人员" v-bind="validateInfos.receiptStaff">
            <a-input v-model:value="formData.receiptStaff" placeholder="请输入回单人员" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="回单时间" v-bind="validateInfos.receiptTime">
		        <a-date-picker placeholder="请选择回单时间"  v-model:value="formData.receiptTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" :disabled="disabled"/>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="回单历时" v-bind="validateInfos.receiptLs">
            <a-input v-model:value="formData.receiptLs" placeholder="请输入回单历时" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="回单历时(剔除夜间时间)" v-bind="validateInfos.receiptLsEliminate">
            <a-input v-model:value="formData.receiptLsEliminate" placeholder="请输入回单历时(剔除夜间时间)" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="承诺恢复时限" v-bind="validateInfos.promiseRecoverTime">
            <a-input v-model:value="formData.promiseRecoverTime" placeholder="请输入承诺恢复时限" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="是否改约" v-bind="validateInfos.gyShifou">
            <a-input v-model:value="formData.gyShifou" placeholder="请输入是否改约" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="改约时间" v-bind="validateInfos.gyTime">
		        <a-date-picker placeholder="请选择改约时间"  v-model:value="formData.gyTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" :disabled="disabled"/>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="故障修复时间" v-bind="validateInfos.repairTime">
		        <a-date-picker placeholder="请选择故障修复时间"  v-model:value="formData.repairTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" :disabled="disabled"/>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="回单超时时长" v-bind="validateInfos.timeoutTime">
            <a-input v-model:value="formData.timeoutTime" placeholder="请输入回单超时时长" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="重复申告次数" v-bind="validateInfos.repetitionFrequency">
            <a-input v-model:value="formData.repetitionFrequency" placeholder="请输入重复申告次数" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="回单所处环节" v-bind="validateInfos.placeLink">
            <a-input v-model:value="formData.placeLink" placeholder="请输入回单所处环节" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="局向" v-bind="validateInfos.jx">
            <a-input v-model:value="formData.jx" placeholder="请输入局向" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="是否越级" v-bind="validateInfos.sfyj">
            <a-input v-model:value="formData.sfyj" placeholder="请输入是否越级" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="回访满意度" v-bind="validateInfos.satisfaction">
            <a-input v-model:value="formData.satisfaction" placeholder="请输入回访满意度" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="不满意原因" v-bind="validateInfos.dissatisfiedCause">
            <a-input v-model:value="formData.dissatisfiedCause" placeholder="请输入不满意原因" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="是否超时" v-bind="validateInfos.sfcs">
            <a-input v-model:value="formData.sfcs" placeholder="请输入是否超时" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="是否考核" v-bind="validateInfos.sfkh">
            <a-input v-model:value="formData.sfkh" placeholder="请输入是否考核" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="维护单位" v-bind="validateInfos.maintainOrg">
            <a-input v-model:value="formData.maintainOrg" placeholder="请输入维护单位" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="用户签约速率" v-bind="validateInfos.userRate">
            <a-input v-model:value="formData.userRate" placeholder="请输入用户签约速率" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="AG设备IP地址" v-bind="validateInfos.agIp">
            <a-input v-model:value="formData.agIp" placeholder="请输入AG设备IP地址" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="itv账号" v-bind="validateInfos.itvId">
            <a-input v-model:value="formData.itvId" placeholder="请输入itv账号" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="分公司" v-bind="validateInfos.filiale">
            <a-input v-model:value="formData.filiale" placeholder="请输入分公司" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="支局" v-bind="validateInfos.zj">
            <a-input v-model:value="formData.zj" placeholder="请输入支局" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="原因是否一致" v-bind="validateInfos.yysfyz">
            <a-input v-model:value="formData.yysfyz" placeholder="请输入原因是否一致" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="子区域名称（县局）" v-bind="validateInfos.sonOrg">
            <a-input v-model:value="formData.sonOrg" placeholder="请输入子区域名称（县局）" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="所属小区" v-bind="validateInfos.shuoshuXq">
            <a-input v-model:value="formData.shuoshuXq" placeholder="请输入所属小区" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="所属网格" v-bind="validateInfos.shuoshuWg">
            <a-input v-model:value="formData.shuoshuWg" placeholder="请输入所属网格" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="营维网格" v-bind="validateInfos.operationWg">
            <a-input v-model:value="formData.operationWg" placeholder="请输入营维网格" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="支局网格" v-bind="validateInfos.zjWg">
            <a-input v-model:value="formData.zjWg" placeholder="请输入支局网格" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="分公司（资源）" v-bind="validateInfos.filialeZy">
            <a-input v-model:value="formData.filialeZy" placeholder="请输入分公司（资源）" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="PON类型" v-bind="validateInfos.ponType">
            <a-input v-model:value="formData.ponType" placeholder="请输入PON类型" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="PON口上的光固话" v-bind="validateInfos.ponGgh">
            <a-input v-model:value="formData.ponGgh" placeholder="请输入PON口上的光固话" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="光宽带数" v-bind="validateInfos.ghds">
            <a-input v-model:value="formData.ghds" placeholder="请输入光宽带数" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="光ITV数" v-bind="validateInfos.itvQuantity">
            <a-input v-model:value="formData.itvQuantity" placeholder="请输入光ITV数" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="基础网格农村类型" v-bind="validateInfos.jcwgnclx">
            <a-input v-model:value="formData.jcwgnclx" placeholder="请输入基础网格农村类型" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="客户分群" v-bind="validateInfos.userGroup">
            <a-input v-model:value="formData.userGroup" placeholder="请输入客户分群" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="订单号" v-bind="validateInfos.orderNumber">
            <a-input v-model:value="formData.orderNumber" placeholder="请输入订单号" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="客户类型" v-bind="validateInfos.userType">
            <a-input v-model:value="formData.userType" placeholder="请输入客户类型" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="路由器品牌型号" v-bind="validateInfos.lyqppxh">
            <a-input v-model:value="formData.lyqppxh" placeholder="请输入路由器品牌型号" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="609处理时长" v-bind="validateInfos.stnTime">
            <a-input v-model:value="formData.stnTime" placeholder="请输入609处理时长" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="10000号回访时长" v-bind="validateInfos.tenThousandTime">
            <a-input v-model:value="formData.tenThousandTime" placeholder="请输入10000号回访时长" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="是否当日修" v-bind="validateInfos.sfdrx">
            <a-input v-model:value="formData.sfdrx" placeholder="请输入是否当日修" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="赔付金额" v-bind="validateInfos.compensation">
            <a-input v-model:value="formData.compensation" placeholder="请输入赔付金额" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="最后一次回单时间" v-bind="validateInfos.zhychdsj">
		        <a-date-picker placeholder="请选择最后一次回单时间"  v-model:value="formData.zhychdsj" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" :disabled="disabled"/>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="是否挂起过" v-bind="validateInfos.sfgqg">
            <a-input v-model:value="formData.sfgqg" placeholder="请输入是否挂起过" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="最后一次挂起释放时间" v-bind="validateInfos.zhycgqsfsj">
            <a-input v-model:value="formData.zhycgqsfsj" placeholder="请输入最后一次挂起释放时间" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="回单人地市" v-bind="validateInfos.hdrdz">
            <a-input v-model:value="formData.hdrdz" placeholder="请输入回单人地市" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="产品名称" v-bind="validateInfos.productName">
            <a-input v-model:value="formData.productName" placeholder="请输入产品名称" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="外线处理历时" v-bind="validateInfos.wxclns">
            <a-input v-model:value="formData.wxclns" placeholder="请输入外线处理历时" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="农超1" v-bind="validateInfos.lcOne">
            <a-input v-model:value="formData.lcOne" placeholder="请输入农超1" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="农超1" v-bind="validateInfos.lcTwo">
            <a-input v-model:value="formData.lcTwo" placeholder="请输入农超1" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="最后一次调度时间" v-bind="validateInfos.zhycddsj">
		        <a-date-picker placeholder="请选择最后一次调度时间"  v-model:value="formData.zhycddsj" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" :disabled="disabled"/>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="是否按时预约" v-bind="validateInfos.sfasyy">
            <a-input v-model:value="formData.sfasyy" placeholder="请输入是否按时预约" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="用户是否评价（海东）" v-bind="validateInfos.yhsfpl">
            <a-input v-model:value="formData.yhsfpl" placeholder="请输入用户是否评价（海东）" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="重复派外线次数" v-bind="validateInfos.cfpyxcs">
            <a-input v-model:value="formData.cfpyxcs" placeholder="请输入重复派外线次数" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="回单网格" v-bind="validateInfos.hdwg">
            <a-input v-model:value="formData.hdwg" placeholder="请输入回单网格" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="WIFI质差" v-bind="validateInfos.wifiQuality">
            <a-input v-model:value="formData.wifiQuality" placeholder="请输入WIFI质差" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="改约次数" v-bind="validateInfos.gycs">
            <a-input v-model:value="formData.gycs" placeholder="请输入改约次数" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="服务类型" v-bind="validateInfos.typeOfService">
            <a-input v-model:value="formData.typeOfService" placeholder="请输入服务类型" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="障碍原因" v-bind="validateInfos.snagsCauses">
            <a-input v-model:value="formData.snagsCauses" placeholder="请输入障碍原因" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="预定位障碍原因" v-bind="validateInfos.ydwzayy">
            <a-input v-model:value="formData.ydwzayy" placeholder="请输入预定位障碍原因" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="障碍原因是否一致" v-bind="validateInfos.zayysfyz">
            <a-input v-model:value="formData.zayysfyz" placeholder="请输入障碍原因是否一致" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="OLT_IP" v-bind="validateInfos.oltIp">
            <a-input v-model:value="formData.oltIp" placeholder="请输入OLT_IP" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="预约时间" v-bind="validateInfos.appointmentTime">
		        <a-date-picker placeholder="请选择预约时间"  v-model:value="formData.appointmentTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" :disabled="disabled"/>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="签到成功时间" v-bind="validateInfos.qdcgsj">
		        <a-date-picker placeholder="请选择签到成功时间"  v-model:value="formData.qdcgsj" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" :disabled="disabled"/>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="是否履约" v-bind="validateInfos.sfly">
            <a-input v-model:value="formData.sfly" placeholder="请输入是否履约" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="经度" v-bind="validateInfos.longitude">
            <a-input v-model:value="formData.longitude" placeholder="请输入经度" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="纬度" v-bind="validateInfos.latitude">
            <a-input v-model:value="formData.latitude" placeholder="请输入纬度" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="LOID" v-bind="validateInfos.loid">
            <a-input v-model:value="formData.loid" placeholder="请输入LOID" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="故障地址" v-bind="validateInfos.gzdz">
            <a-input v-model:value="formData.gzdz" placeholder="请输入故障地址" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="工单历时（海东）" v-bind="validateInfos.gdls">
            <a-input v-model:value="formData.gdls" placeholder="请输入工单历时（海东）" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="派单一小时后催单导致未履约" v-bind="validateInfos.ygxshcddzwly">
            <a-input v-model:value="formData.ygxshcddzwly" placeholder="请输入派单一小时后催单导致未履约" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="政企承诺恢复时限" v-bind="validateInfos.zqclhfsx">
            <a-input v-model:value="formData.zqclhfsx" placeholder="请输入政企承诺恢复时限" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="政企回单历时(剔除夜间时间)" v-bind="validateInfos.zqhdlxtcysj">
            <a-input v-model:value="formData.zqhdlxtcysj" placeholder="请输入政企回单历时(剔除夜间时间)" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="政企是否履约" v-bind="validateInfos.zqsfly">
            <a-input v-model:value="formData.zqsfly" placeholder="请输入政企是否履约" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="宽带账号" v-bind="validateInfos.broadBandPassword">
            <a-input v-model:value="formData.broadBandPassword" placeholder="请输入宽带账号" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="系统自动预判结果" v-bind="validateInfos.xtzdpdjg">
            <a-input v-model:value="formData.xtzdpdjg" placeholder="请输入系统自动预判结果" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
        <a-col :span="24">
          <a-form-item label="故障产品" v-bind="validateInfos.faultyItem">
            <a-input v-model:value="formData.faultyItem" placeholder="请输入故障产品" :disabled="disabled"></a-input>
          </a-form-item>
        </a-col>
      </a-row>
    </a-form>
  </a-spin>
</template>

<script lang="ts" setup>
  import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
  import { defHttp } from '/@/utils/http/axios';
  import { useMessage } from '/@/hooks/web/useMessage';
  import { getValueType } from '/@/utils';
  import { saveOrUpdate } from '../SyFaultHandling.api';
  import { Form } from 'ant-design-vue';
  
  const props = defineProps({
    formDisabled: { type: Boolean, default: false },
    formData: { type: Object, default: ()=>{} },
    formBpm: { type: Boolean, default: true }
  });
  const formRef = ref();
  const useForm = Form.useForm;
  const emit = defineEmits(['register', 'ok']);
  const formData = reactive<Record<string, any>>({
    id: '',
    workOrderMark: '',   
    guaranteedOrg: '',   
    workOrderState: '',   
    disposeTime: '',   
    userLocation: '',   
    disposeCity: '',   
    gzdwjg: '',   
    productType: '',   
    userGrade: '',   
    barrierSort: '',   
    content: '',   
    receiptOrg: '',   
    resultOfHandling: '',   
    faultSignature: '',   
    disposeCause: '',   
    receiptStaff: '',   
    receiptTime: '',   
    receiptLs: '',   
    receiptLsEliminate: '',   
    promiseRecoverTime: '',   
    gyShifou: '',   
    gyTime: '',   
    repairTime: '',   
    timeoutTime: '',   
    repetitionFrequency: '',   
    placeLink: '',   
    jx: '',   
    sfyj: '',   
    satisfaction: '',   
    dissatisfiedCause: '',   
    sfcs: '',   
    sfkh: '',   
    maintainOrg: '',   
    userRate: '',   
    agIp: '',   
    itvId: '',   
    filiale: '',   
    zj: '',   
    yysfyz: '',   
    sonOrg: '',   
    shuoshuXq: '',   
    shuoshuWg: '',   
    operationWg: '',   
    zjWg: '',   
    filialeZy: '',   
    ponType: '',   
    ponGgh: '',   
    ghds: '',   
    itvQuantity: '',   
    jcwgnclx: '',   
    userGroup: '',   
    orderNumber: '',   
    userType: '',   
    lyqppxh: '',   
    stnTime: '',   
    tenThousandTime: '',   
    sfdrx: '',   
    compensation: '',   
    zhychdsj: '',   
    sfgqg: '',   
    zhycgqsfsj: '',   
    hdrdz: '',   
    productName: '',   
    wxclns: '',   
    lcOne: '',   
    lcTwo: '',   
    zhycddsj: '',   
    sfasyy: '',   
    yhsfpl: '',   
    cfpyxcs: '',   
    hdwg: '',   
    wifiQuality: '',   
    gycs: '',   
    typeOfService: '',   
    snagsCauses: '',   
    ydwzayy: '',   
    zayysfyz: '',   
    oltIp: '',   
    appointmentTime: '',   
    qdcgsj: '',   
    sfly: '',   
    longitude: '',   
    latitude: '',   
    loid: '',   
    gzdz: '',   
    gdls: '',   
    ygxshcddzwly: '',   
    zqclhfsx: '',   
    zqhdlxtcysj: '',   
    zqsfly: '',   
    broadBandPassword: '',   
    xtzdpdjg: '',   
    faultyItem: '',   
  });
  const { createMessage } = useMessage();
  const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
  const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
  const confirmLoading = ref<boolean>(false);
  //表单验证
  const validatorRules = {
  };
  const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });

  // 表单禁用
  const disabled = computed(()=>{
    if(props.formBpm === true){
      if(props.formData.disabled === false){
        return false;
      }else{
        return true;
      }
    }
    return props.formDisabled;
  });

  
  /**
   * 新增
   */
  function add() {
    edit({});
  }

  /**
   * 编辑
   */
  function edit(record) {
    nextTick(() => {
      resetFields();
      //赋值
      Object.assign(formData, record);
    });
  }

  /**
   * 提交数据
   */
  async function submitForm() {
    // 触发表单验证
    await validate();
    confirmLoading.value = true;
    const isUpdate = ref<boolean>(false);
    //时间格式化
    let model = formData;
    if (model.id) {
      isUpdate.value = true;
    }
    //循环数据
    for (let data in model) {
      //如果该数据是数组并且是字符串类型
      if (model[data] instanceof Array) {
        let valueType = getValueType(formRef.value.getProps, data);
        //如果是字符串类型的需要变成以逗号分割的字符串
        if (valueType === 'string') {
          model[data] = model[data].join(',');
        }
      }
    }
    await saveOrUpdate(model, isUpdate.value)
      .then((res) => {
        if (res.success) {
          createMessage.success(res.message);
          emit('ok');
        } else {
          createMessage.warning(res.message);
        }
      })
      .finally(() => {
        confirmLoading.value = false;
      });
  }


  defineExpose({
    add,
    edit,
    submitForm,
  });
</script>

<style lang="less" scoped>
  .antd-modal-form {
    min-height: 500px !important;
    overflow-y: auto;
    padding: 24px 24px 24px 24px;
  }
</style>
